package com.zhuiYun.project.api.commoditycollection.service;

import com.zhuiYun.project.api.commoditycollection.entity.dto.CommodityCollectionDTO;
import com.zhuiYun.project.api.commoditycollection.model.CommodityCollectionModel;
import com.zhuiYun.project.api.handworkdiycollection.model.HandworkDiyCollectionModel;
import com.zhuiYun.project.common.errorCode.CommonException;
import com.zhuiYun.project.common.response.CommonResult;

/**
* @Author yangze
* @Description  商品收藏查询
* @Date 2023/4/5 9:20
*
*/

public interface CommodityCollectionService {
   /**
    * @Author yangze
    * @Description TODO 根据用户id查询商品收藏列表
    * @Date 2023/4/5 9:21
    * @Param [commodityCollectionDTO]
    * @Return com.zhuiYun.project.common.response.CommonResult
    */
   CommonResult selectByUserId(CommodityCollectionDTO commodityCollectionDTO)throws CommonException;
    /**
     * @Author yangze
     * @Description TODO 根据用户id删除商品收藏
     * @Date 2023/4/5 9:21
     * @Param id
     * @Return CommonResult
     */
    CommonResult deleteById(Integer id)throws CommonException;

    /**
    * @Author yangze
    * @Description TODO 收藏商品
    * @Date 2023/4/5 16:38
    * @Return  CommonResult
    * @param commodityCollectionModel
    */
    CommonResult insertCollection(CommodityCollectionModel commodityCollectionModel) throws CommonException;


    CommonResult selectCollection(Integer userId, Integer commodityId);

    /**
     * @Author yangze
     * @Description 根据用户userid和commodityId商品id取消收藏
     * @Date 2023/4/10 15:19
     * @Return
     * @param commodityCollectionModel
     */
    CommonResult deleteByUserIdAndDiyId(CommodityCollectionModel commodityCollectionModel);
}
